.timeline-comment {
  display: flex;
  align-items: flex-start;
  margin: $spacer-3 0;

  .avatar {
    display: none;
    background-color: transparent;
  }

  .avatar > img {
    border-radius: $border-radius;
  }

  .comment {
    position: relative;
    flex-grow: 1;
    flex-basis: 0;
    min-width: 0px;
    background-color: $bg-white;
    border: $border;
    border-radius: $border-radius;
  }

  .comment-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: $text-gray;
    background-color: $bg-gray;
    border-bottom: $border;
  }

  .comment-meta {
    padding: 10px $spacer-3;
  }

  .comment-actions {
    display: flex;
    align-items: center;
  }

  .new-comment-header {
    padding: $spacer-2 $spacer-2 0 $spacer-2;
    background-color: $bg-gray;
    border-bottom: $border;
    margin-bottom: 0;
  }

  .markdown-body {
    padding: $spacer-3 $spacer-3;
    font-size: $body-font-size;
  }

  .comment-body {
    padding: $spacer-2;

    textarea {
      appearance: none;
      display: block;
      max-height: 550px;
      resize: vertical;
    }

    textarea,
    .markdown-body {
      padding: $spacer-2;
      width: 100%;
      min-height: 90px;
      border: $border;
      border-radius: $border-radius;
    }

    textarea:focus {
      box-shadow: $btn-input-focus-shadow;
    }

    textarea:disabled {
      background-color: $bg-gray;
    }
  }

  .comment-footer {
    display: flex;
    border-top: $border;

    &[reaction-count="0"] {
      height: 0;
      overflow: hidden;
      opacity: 0;
    }

    &:not(:hover) .reactions-popover:not([open]) {
      height: 0;
      overflow: hidden;
      opacity: 0;
      summary {
        opacity: 0;
      }
    }
  }

  .new-comment-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 $spacer-2 $spacer-2 $spacer-2;

    .markdown-info {
      font-size: $font-size-small;
    }
  }

  &.current-user .comment-header {
    background-color: $bg-blue-light;
  }

  .author-association-badge {
    margin-top: -1px;
    margin-right: $spacer-1;
    padding: 2px 5px;
    border: $border;
    border-radius: $border-radius;
    font-size: $font-size-small;
    font-weight: $font-weight-semibold;
  }

  .reactions-popover {
    display: none;
  }

  @media screen and (min-width: map-get($breakpoints, sm)) {
    .avatar {
      display: block;
      margin-right: $spacer-3;
    }

    .comment {
      @include double-caret($bg-gray, $border-gray-dark);
    }

    &.current-user .comment {
      @include double-caret($bg-blue-light, $border-gray-dark);
    }

    .reactions-popover {
      display: inline-block;
    }
  }
}
